package com.lagou.seckill.mvc.web;

import com.lagou.seckill.dto.Response;
import com.lagou.seckill.mvc.service.PayService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
public final class PayController {

    final PayService payService;


    @PostMapping("pay/{commodityId}")
    public Response pay(@PathVariable String commodityId) {
        return payService.pay(commodityId);
    }
}
